#pragma once
#include "SymbolTableEntry.h"
#include "HashTableHash.h"

class SymbolTable
{
public:
	SymbolTable(SymbolTable *i_ParentTable);
	virtual ~SymbolTable(void);

	SymbolTableEntry *Add(const Token *i_Token);
	SymbolTableEntry *Find(char *i_Name) const;
	SymbolTableEntry *Lookup(char *i_Name) const;
	bool Exists(char *i_Name) const;
	
	SymbolTableEntry *operator[](char *i_Key);

private:
	HashTableHash<SymbolTableEntry> m_HashTable;
	SymbolTable *m_ParentTable;
};